package cn.iocoder.yudao.module.els.controller.admin.codeGenerator.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 编码生成器 Response VO")
@Data
@ExcelIgnoreUnannotated
public class CodeGeneratorRespVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("id")
    private Long id;

    @Schema(description = "生成器名称", example = "赵六")
    @ExcelProperty("生成器名称")
    private String generatorName;

    @Schema(description = "编码类型", example = "1")
    @ExcelProperty(value = "编码类型", converter = DictConvert.class)
    @DictFormat("system_user_sex") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String codeType;

    @Schema(description = "编码长度")
    @ExcelProperty("编码长度")
    private Integer codeLength;

    @Schema(description = "流水号长度")
    @ExcelProperty("流水号长度")
    private Integer serialLength;

    @Schema(description = "编码样例")
    @ExcelProperty("编码样例")
    private String codeSample;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}